<html lang="zh_cn">

<head>
    <meta http-equiv="content-type" content="txt/html; charset=utf-8" />
    <title>Test</title>
    <script src="./zbActionSheet.js"></script>

</head>

<body style="margin: 0;">

<script>
    let zbAS = new zbActionSheet();
    zbAS.init('zbAS', 'test');
    zbAS.clickListCallBack.push(function (obj) {
        let params = zbAS.getListParams();
        console.log(params)
        if (params['id'] && params['id'] == 'country') {
            let data = [
                {params:{id:'city'}, values:['郑州:1', '南阳:2', '洛阳:3', '开封:4']},
            ];
            zbAS.addList(data);
        } else if (params['id'] && params['id'] == 'city') {
            let data = [
                {params:{id:'area'}, values:['社旗县:1', '卧龙区:2', '方城:3', '汝州:4']},
            ];
            zbAS.addList(data);
        } else {
            zbAS.hide();
        }


    });

    let data = [
        {params:{id:'country'}, values:['河南:1', '河北:2', '湖南:3', '湖北:4', '山东:4', '山西:4']},
    ];

    zbAS.addList(data);
    zbAS.show();
</script>

<script>
    // let zbAS = new zbActionSheet();
    // zbAS.init('zbAS', 'test');
    // let config = {id:'address', maxlength:1000, style:'height:300px',  'params': {a:1,b:2}}
    // zbAS.addTextarea(config);
    // zbAS.show();
</script>

</body>

</html>